<% @id_for_menu = params[:project_id] ? params[:project_id] : params[:id] %>

<div id="gru-menu">
  <ul>
    <li ><%= link_to (t :overview, :scope => [:helpers, :navigation, :menu]), project_path(@id_for_menu), :class => ( @project && !@workpackages && !@workpackage && !@bugs && !@bug && !@topics && !@topic && !@dataobjects && !@dataobject && !@members && !@member ) ? 'gru-nav-item-active' : 'gru-nav-item' %></li>
    <li ><%= link_to (t :workpackages, :scope => [:helpers, :navigation, :menu]), project_workpackages_path(@id_for_menu), :class => (@workpackages || @workpackage ? 'gru-nav-item-active' : 'gru-nav-item') %></li>
    <li ><%= link_to (t :bug_reports, :scope => [:helpers, :navigation, :menu]), project_bugs_path(@id_for_menu), :class => (@bugs || @bug || params[:bug_id]? 'gru-nav-item-active' : 'gru-nav-item') %></li>
    <li ><%= link_to (t :discussions, :scope => [:helpers, :navigation, :menu]), project_topics_path(@id_for_menu), :class => ( (@topics || @topic) && !(@bugs || @bug || params[:bug_id]) ? 'gru-nav-item-active' : 'gru-nav-item') %></li>
    <li ><%= link_to (t :files, :scope => [:helpers, :navigation, :menu]), project_dataobjects_path(@id_for_menu), :class => ( (@dataobjects || @dataobject) && !(@bugs || @bug ) ? 'gru-nav-item-active' : 'gru-nav-item') %></li>
    <li ><%= link_to (t :members, :scope => [:helpers, :navigation, :menu]), project_members_path(@id_for_menu), :class => (@members || @member ? 'gru-nav-item-active' : 'gru-nav-item') %></li>
  </ul>
</div>